const int potpin = 0;
const int ledpin = 11;
 
 
void setup() {
  
  pinMode(0,INPUT); 
  pinMode(11,OUTPUT);
  Serial.begin(9600);
}
 
 
void loop() {
 
  analogWrite(ledpin, (map(analogRead(potpin), 0, 1023, 235, 0)));
  Serial.println((map(analogRead(potpin), 0, 1023, 235, 0)));
  delay(500);
}
